-
Notifications
You must be signed in to change notification settings - Fork 5
FIX/Fix the BroadCast File Transfer #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
My take on this is I have an Acknowledgment system(NACK) that checks whether all the packets have arrived or not. If not, the system says that these packets [Sequence Number] are not present and again retransmits those missing packets. |
|
could you share a video of this working also can you test this against the tcp based approach to see if your approach actually to quantize the effect of changing to your approach |
|
I'm sorry, sir I didn't understand
Do I redo this using the TCP approach?
This was the logic before My Update
I will also share a Video shortly, but sir, how do I simulate packet loss? |
|
@nxd010 i meant could you implement a basic tcp based broadcast and check if using the udp approach makes things better?? |
|
ok sir |
|
@lokesh-wagh sir, I tried using basic TCP, but it will defeat the scope of these changes since TCP is a One-to-one connection, which means it can't be used for a one-to-many connection where we need to broadcast files to many peers. However, while digging around, I found out a hybrid method using UDP as a beacon and TCP for Unicast file transfer. I will generate a PR for that after confirming changes |
|
that's the point i want to benchmark your approach against tcp based one and see what works the best |
Description
added a header to each packet with a session ID and sequence number. After the initial broadcast, receivers send NACKs (Negative Acknowledgements) listing any missing packets. The sender then re-broadcasts only those missing chunks, ensuring a complete and ordered file.
To improve flexibility, hardcoded network addresses were moved to a configuration file. The receiver now safely buffers chunks before writing to disk, preventing file corruption from out-of-order packets. This makes the broadcast fast, resilient to packet loss, and stable.
Related Issue
Fixes #3 (issue)
Type of change
Motivation and Context
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Screenshots (if appropriate):
Checklist:
Test Configuration: